import { ADD_COUNT } from './types'
const defulatState = {
  count: 1
}
export default (state = defulatState, action) => {
  if (action.type === ADD_COUNT) {
    const newState = JSON.parse(JSON.stringify(state))
    console.log(action)
    newState.count += action.value
    return newState
  }
  return state
}